import React, { PureComponent, Children } from 'react'
import PropTypes from 'prop-types'

export default class BaseView extends PureComponent {
  static childContextTypes = {
    state: PropTypes.object,
    handlers: PropTypes.object,
    actions: PropTypes.object,
    preload: PropTypes.object,
  }
  getChildContext() {
    return this.props.context
  }
  render() {
    return Children.only(this.props.children)
  }
}